<div class="panel panel-default" ng-controller="ShiftListCtrl">
	<div class="panel-heading">
		订票管理 / 班次列表<span style="color:red">（该班次信息为已经下单的所有班次数据）</span>
	</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.shiftNo" class="form-control" placeholder="车次号">
				</div>
			</div>
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.terminal" class="form-control" placeholder="终点站">
				</div>
			</div>
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.code" class="form-control" placeholder="助记码">
				</div>
			</div>
			<div class="form-group col-md-4" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" datepicker-popup="{{format}}" is-open="opened" ng-model="timeRange.startTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="开始时间" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-4" ng-controller="DatepickerDemoCtrl">
				<div class="col-md-11">
					<div class="input-group">
						<input type="text" class="form-control" datepicker-popup="{{format}}" is-open="opened" ng-model="timeRange.endTime" datepicker-options="dateOptions"
							close-text="Close" placeholder="结束时间" readOnly /> <span class="input-group-btn">
							<button type="button" class="btn btn-default"
								ng-click="open($event)">
								<i class="glyphicon glyphicon-calendar"></i>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-4">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
					<button type="button" class="btn btn-info" ng-click="sync()" has-authority="BOOKING_SHIFT_SYNC">
						同步班次缓存</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:50px;">车次号</th>
					<th style="width:50px;">终点站</th>
					<th style="width:50px;">发车日期</th>
					<th style="width:50px;">发车时间</th>
					<th style="width:50px;">距离</th>
					<th style="width:50px;">剩余票数</th>
					<th style="width:50px;">票价</th>
					<th style="width:50px;">座位</th>
					<th style="width:50px;">路线</th>
					<th style="width:50px;">助记码</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="shift in dataList">
					<td></td>
					<td>{{shift.shiftNo}}</td>
					<td>{{shift.terminal}}</td>
					<td>{{shift.departureDate| date : 'yyyy-MM-dd'}}</td>
					<td>{{shift.departureTime| date : 'HH:mm:ss'}}</td>
					<td>{{shift.distance}}</td>
					<td>{{shift.tickets}}</td>
					<td>{{shift.price | number:2}}</td>
					<td>{{shift.seat}}</td>
					<td>{{shift.runline}}</td>
					<td>{{shift.code}}</td>
				</tr>
				<tr ng-show="dataList==''">
					<td colspan="11" style="text-align: center;">暂无班次信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>